|
|
|
|
|
|
|
Address TEXT (40),
City TEXT (40),
State TEXT (20),
Zip TEXT (10),
Phone TEXT (14),
Comments MEMO,
CONSTRAINT PKCustomers Primary Key (CustomerID)); |
|
|
|
|
|
|
|
|
Create Table VehicleTypes
(VehicleType TEXT (10),
Make TEXT (25),
Model TEXT (25),
Comments MEMO,
CONSTRAINT PKVehicleTypes Primary Key (VehicleType)); |
|
|
|
|
|
|
|
|
Create Table Vehicles
(SerialNumber INTEGER,
CustomerID TEXT (10),
License TEXT (10),
VehicleType TEXT (10),
Color TEXT (15),
Odometer INTEGER,
Comments MEMO,
CONSTRAINT PKVehicles Primary Key (SerialNumber),
CONSTRAINT FKCustomer Foreign Key (CustomerID)
_REFERENCES Customers(CustomerID),
CONSTRAINT FKType Foreign Key (VehicleType)
_REFERENCES VehicleTypes(VehicleType)); |
|
|
|
|
|
|
|
|
1. The Microsoft Jet database engine provides three levels of locking: database locking, which locks the entire database for exclusive use; table locking, which locks a table for exclusive use; and page locking, which locks data pages 2KB in size. |
|
|
|
|
|
|
|
|
2. You want to use database locking when compacting a database because compacting affects all the objects in a database. |
|
|
|
|
|
|
|
|
3. You want to use table locking when doing a mass update of a single table. You want exclusive use of the data to be changed, but you do not necessarily have to have exclusive use of the entire database when performing field update functions. |
|
|
|
|
|
|
|
|
4. You use the LockEdits property of a recordset to control how page locking is handled by your application. Setting this property to True means you have pessimistic locking. Setting this property to False means you have optimistic locking. |
|
|
|
|
|
|
|
|
5. Pessimistic locking prohibits two users from opening a data page at the same time (that is, when the Edit or AddNew method is invoked). Optimistic locking permits two users to open the same page but only allows updates to be saved by the first user to make the changes. |
|
|
|
|
|